<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-jmeterAlertConfig-add">

			<label class="col-sm-3 control-label">启用 禁用：</label>
			<div class="radio-box">
				<input type="radio"  name="status" value="1" checked="true"  >
				<label style="color:#2b31dc" th:text="启用" ></label>
			</div>
			<div class="radio-box">
				<input type="radio" name="status" value="0" >
				<label style="color:#2b31dc" th:text="禁用"></label>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">选择测试用例：</label>
				<div class="col-sm-8">
					<select id="caseId" name="caseId" class="form-control m-b" >
						<option value="" >请选择</option>
						<option th:each="item:${cases}" th:text="${item.caseName}" th:value="${item.id}" ></option>
					</select>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">并发数阈值：</label>
				<div class="col-sm-8">
					<input id="threadThreshold" name="threadThreshold" class="form-control" type="text">
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">TPS阈值小于：</label>
				<div class="col-sm-8">
					<input id="tps" name="tps" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">事务成功率小于：</label>
				<div class="col-sm-8">
					<input id="successRatio" name="successRatio" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">平均响应耗时大于：</label>
				<div class="col-sm-8">
					<input id="avgRespTime" name="avgRespTime" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">95line时间大于：</label>
				<div class="col-sm-8">
					<input id="line95" name="line95" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
	<script th:src="@{/ajax/libs/select/select2.js}"></script>
	<script type="text/javascript">
		var prefix = ctx + "jmeter/jmeterAlertConfig"
		$("#form-jmeterAlertConfig-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-jmeterAlertConfig-add').serialize());
	        }
	    }

	    $(function () {

			$("#caseId").select2();



		});
	</script>
</body>
</html>
